<?php

/**
 * Sitvivienda form base class.
 *
 * @package    form
 * @subpackage sitvivienda
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseSitviviendaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'            => new sfWidgetFormInputHidden(),
      'numhistoria'   => new sfWidgetFormPropelSelect(array('model' => 'Historia', 'add_empty' => false)),
      'terrenopropio' => new sfWidgetFormInputCheckbox(),
      'cantidadper'   => new sfWidgetFormInput(),
      'adquicesta'    => new sfWidgetFormInput(),
      'dondeduerme'   => new sfWidgetFormInput(),
      'dispo_dormir'  => new sfWidgetFormInput(),
      'inst_roedores' => new sfWidgetFormInput(),
      'animales'      => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'            => new sfValidatorPropelChoice(array('model' => 'Sitvivienda', 'column' => 'id', 'required' => false)),
      'numhistoria'   => new sfValidatorPropelChoice(array('model' => 'Historia', 'column' => 'id')),
      'terrenopropio' => new sfValidatorBoolean(array('required' => false)),
      'cantidadper'   => new sfValidatorInteger(array('required' => false)),
      'adquicesta'    => new sfValidatorString(array('max_length' => 16, 'required' => false)),
      'dondeduerme'   => new sfValidatorString(array('max_length' => 16, 'required' => false)),
      'dispo_dormir'  => new sfValidatorString(array('max_length' => 25, 'required' => false)),
      'inst_roedores' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'animales'      => new sfValidatorString(array('max_length' => 20, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('sitvivienda[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Sitvivienda';
  }


}
